From 50ae0b8f02c034e60d4cbb504620dfa1575a836f Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 28 Jul 2025 09:19:42 +0000 Subject: (박서영) 설계 document Numbering Rule 개발-최겸 업로드 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docu-list-rule/code-groups/page.tsx | 54 +++++++++++++++++ .../docu-list-rule/combo-box-settings/page.tsx | 53 +++++++++++++++++ .../docu-list-rule/document-class/page.tsx | 52 ++++++++++++++++ .../(engineering)/docu-list-rule/layout.tsx | 69 ++++++++++++++++++++++ .../docu-list-rule/number-type-configs/page.tsx | 60 +++++++++++++++++++ .../docu-list-rule/number-types/page.tsx | 52 ++++++++++++++++ .../(engineering)/docu-list-rule/page.tsx | 11 ++++ 7 files changed, 351 insertions(+) create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx create mode 100644 app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx (limited to 'app/[lng]/engineering/(engineering)/docu-list-rule') diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx new file mode 100644 index 00000000..5aebf15d --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx @@ -0,0 +1,54 @@ +import * as React from "react"; +import { type SearchParams } from "@/types/table"; +import { Shell } from "@/components/shell"; +import { Skeleton } from "@/components/ui/skeleton"; +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; +import { getCodeGroups } from "@/lib/docu-list-rule/code-groups/service"; +import { CodeGroupsTable } from "@/lib/docu-list-rule/code-groups/table/code-groups-table"; +import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation"; +import { InformationButton } from "@/components/information/information-button"; + +interface IndexPageProps { + searchParams: Promise; +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams; + const search = searchParamsCodeGroupsCache.parse(searchParams); + + const promises = Promise.all([ + getCodeGroups({ + ...search, + }), + ]); + + return ( + +
+
+
+

Code Group 정의

+ +
+ {/*

+ 문서 번호에 사용될 수 있는 다양한 코드 그룹의 정의를 관리하는 페이지입니다. +

*/} +
+
+ }> + + } + > + + +
+ ); +} \ No newline at end of file diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx new file mode 100644 index 00000000..cf0bf02e --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx @@ -0,0 +1,53 @@ +import * as React from "react"; +import { Shell } from "@/components/shell"; +import { Skeleton } from "@/components/ui/skeleton"; +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; +import { getComboBoxCodeGroups } from "@/lib/docu-list-rule/combo-box-settings/service"; +import { ComboBoxSettingsTable } from "@/lib/docu-list-rule/combo-box-settings/table/combo-box-settings-table"; +import { InformationButton } from "@/components/information/information-button"; +import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation"; + +interface IndexPageProps { + searchParams: Promise; +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams; + + const promises = Promise.all([ + getComboBoxCodeGroups( + searchParamsCodeGroupsCache.parse(searchParams) + ), + ]); + + return ( + +
+
+
+

Combo Box 설정

+ +
+ {/*

+ Combo Box 옵션을 관리하는 페이지입니다. + 각 Code Group별로 Combo Box에 표시될 옵션들을 설정할 수 있습니다. +

*/} +
+
+ }> + + } + > + + +
+ ); +} \ No newline at end of file diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx new file mode 100644 index 00000000..5c2c600e --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx @@ -0,0 +1,52 @@ +import * as React from "react"; +import { Shell } from "@/components/shell"; +import { Skeleton } from "@/components/ui/skeleton"; +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; +import { getDocumentClassCodeGroups } from "@/lib/docu-list-rule/document-class/service"; +import { DocumentClassTable } from "@/lib/docu-list-rule/document-class/table/document-class-table"; +import { InformationButton } from "@/components/information/information-button"; +import { searchParamsDocumentClassCache } from "@/lib/docu-list-rule/document-class/validation"; + +interface IndexPageProps { + searchParams: Promise; +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams; + + const promises = Promise.all([ + getDocumentClassCodeGroups( + searchParamsDocumentClassCache.parse(searchParams) + ), + ]); + + return ( + +
+
+
+

Document Class 관리

+ +
+ {/*

+ Document Class를 관리합니다. +

*/} +
+
+ }> + + } + > + + +
+ ); +} \ No newline at end of file diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx new file mode 100644 index 00000000..25023e4b --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx @@ -0,0 +1,69 @@ +import { Metadata } from "next" + +import { Separator } from "@/components/ui/separator" +import { SidebarNav } from "@/components/layout/sidebar-nav" + +export const metadata: Metadata = { + title: "Document Numbering Rule", +} + + + +export default async function DocumentNumberingLayout({ + children, + params, +}: { + children: React.ReactNode + params: { lng: string } +}) { + const resolvedParams = await params + const lng = resolvedParams.lng + + const sidebarNavItems = [ + { + title: "Document Class 관리", + href: `/${lng}/engineering/docu-list-rule/document-class`, + }, + { + title: "Code Group 정의", + href: `/${lng}/engineering/docu-list-rule/code-groups`, + }, + { + title: "Combo Box 설정", + href: `/${lng}/engineering/docu-list-rule/combo-box-settings`, + }, + { + title: "Number Type 관리", + href: `/${lng}/engineering/docu-list-rule/number-types`, + }, + { + title: "Number Type별 설정", + href: `/${lng}/engineering/docu-list-rule/number-type-configs`, + }, + ] + + return ( + <> +
+
+
+
+

Document Numbering Rule (해양)

+

+ 벤더 제출 문서 리스트 작성 시에 사용되는 넘버링 +

+
+ + +
+ +
{children}
+
+
+
+
+ + ) +} \ No newline at end of file diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx new file mode 100644 index 00000000..4195ba24 --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx @@ -0,0 +1,60 @@ +import * as React from "react"; +import { Shell } from "@/components/shell"; +import { Skeleton } from "@/components/ui/skeleton"; +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; +import { NumberTypeConfigsTable } from "@/lib/docu-list-rule/number-type-configs/table/number-type-configs-table"; +import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service"; +import { InformationButton } from "@/components/information/information-button"; + +interface IndexPageProps { + searchParams: Promise; +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams; + + const promises = Promise.all([ + getNumberTypes({ + page: 1, + perPage: 1000, // 모든 Number Type을 가져오기 위해 큰 값 설정 + search: "", + sort: [{ id: "id", desc: false }], // DB 등록 순서대로 정렬 + filters: [], + joinOperator: "and", + flags: ["advancedTable"], + numberTypeId: "", + description: "", + isActive: "" + }), + ]); + + return ( + +
+
+
+

Number Type별 설정

+ +
+ {/*

+ 각 문서 번호 유형별로 어떤 코드 그룹들을 어떤 순서로 사용할지 설정하는 페이지입니다. +

*/} +
+
+ }> + + } + > + + +
+ ); +} \ No newline at end of file diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx new file mode 100644 index 00000000..6fa010c7 --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx @@ -0,0 +1,52 @@ +import * as React from "react"; +import { Shell } from "@/components/shell"; +import { Skeleton } from "@/components/ui/skeleton"; +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; +import { NumberTypesTable } from "@/lib/docu-list-rule/number-types/table/number-types-table"; +import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service"; +import { InformationButton } from "@/components/information/information-button"; +import { searchParamsNumberTypesCache } from "@/lib/docu-list-rule/number-types/validation"; + +interface IndexPageProps { + searchParams: Promise; +} + +export default async function IndexPage(props: IndexPageProps) { + const searchParams = await props.searchParams; + + const promises = Promise.all([ + getNumberTypes( + searchParamsNumberTypesCache.parse(searchParams) + ), + ]); + + return ( + +
+
+
+

Number Type 관리

+ +
+ {/*

+ 문서 번호 유형을 추가, 수정, 삭제할 수 있는 페이지입니다. +

*/} +
+
+ }> + + } + > + + +
+ ); +} \ No newline at end of file diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx new file mode 100644 index 00000000..fed49256 --- /dev/null +++ b/app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx @@ -0,0 +1,11 @@ +import { redirect } from "next/navigation" + + +export default async function DocumentNumberingPage({ + params, +}: { + params: { lng: string } +}) { + // Code Group 페이지로 리다이렉트 + redirect(`/${params.lng}/engineering/docu-list-rule/document-class`) +} \ No newline at end of file -- cgit v1.2.3